package com.edu.test;
/*
 * @Author:princess
 * @Date 2023/10/23 10 23 19:11
 *
 */

import com.edu.bean.MyDataSource;
import com.edu.bean.User;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class MyTest2 {
    @Test
    public void test01(){
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-ioc2.xml");
        MyDataSource dataSource = context.getBean(MyDataSource.class);
        System.out.println(dataSource);
    }

    @Test
    public void test02(){
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-ioc3.xml");
        MyDataSource dataSource = context.getBean(MyDataSource.class);
        System.out.println(dataSource);
    }
}
